'''
Created on 2011-5-19

@author: lchengh2
'''
from myhomework.common.daos import *

class DeploymentSetting(object):
    def __init__(self,
                 new_root_path,
                 new_src_path):
        self.root_path = new_root_path
        self.src_path = new_src_path
    
    def get_root_path(self):
        return self.root_path
    
    def get_src_path(self):
        return self.src_path
    
    @staticmethod
    def load_setting():
#        tree = et.parse(setting_file_name)
#        settings__tag_list = tree.getiterator('settings')
#        root_path_tag_list = settings__tag_list[0].getchildren()
        root_path = SettingDao.get_setting("root_path_of_homework")
        src_path = SettingDao.get_setting("root_path_of_src_file")
        ds = DeploymentSetting(root_path,src_path)
        return ds
    
